﻿package mortal.game.view.task.drama.operations
{
    import Message.DB.Tables.*;
    import flash.utils.*;
    import mortal.game.manager.*;
    import mortal.game.view.task.data.*;
    import mortal.game.view.task.drama.*;

    public class TaskDramaOpTaskTalkText extends Object implements ITaskDramaStepCommand
    {

        public function TaskDramaOpTaskTalkText()
        {
            return;
        }// end function

        public function call(param1:TTaskDrama, param2:Function = null) : void
        {
            var finished:Function;
            var data:* = param1;
            var callback:* = param2;
            finished = function () : void
            {
                if (callback != null)
                {
                    callback.apply();
                }
                return;
            }// end function
            ;
            var time:int;
            if (TaskDramaOperator.ationTime > 0)
            {
                time = TaskDramaOperator.ationTime;
            }
            MsgManager.showTaskTarget(GLinkTextDataParser.parseToHtmlFormat(data.talkText), time);
            setTimeout(finished, time * 1000 + 100);
            return;
        }// end function

        public function cancel(param1:TTaskDrama, param2:Function = null) : void
        {
            return;
        }// end function

        public function dispose() : void
        {
            return;
        }// end function

    }
}
